-- GENERATED SPELL FOR [Elder Nightsaber] --


function spell0_2033(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2033', 575, 1)
end

function spell1_2033(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2033', 0, 1)
end

function spell2_2033(pUnit, Event) --@Prowl,Self--
pUnit:FullCastSpellOnTarget(24450,pUnit)
pUnit:RegisterEvent('Sorts_2033', 0, 1)
end

function spell3_2033(pUnit, Event) --@Rake,n/a--
pUnit:FullCastSpellOnTarget(59881,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2033', 9000, 1)
end

function Sorts_2033(pUnit, Event)
local choix_sorts_2033 = math.random(0, 3)
if choix_sorts_2033 == 0 then
pUnit:RegisterEvent('spell0_2033', 1, 1)
end
if choix_sorts_2033 == 1 then
pUnit:RegisterEvent('spell1_2033', 1, 1)
end
if choix_sorts_2033 == 2 then
pUnit:RegisterEvent('spell2_2033', 1, 1)
end
if choix_sorts_2033 == 3 then
pUnit:RegisterEvent('spell3_2033', 1, 1)
end
end

function mob2033_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2033', math.random(1500, 3000), 1)
end

function mob2033_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2033_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2033_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2033, 1, 'mob2033_Action')
RegisterUnitEvent(2033, 2, 'mob2033_Leave')
RegisterUnitEvent(2033, 3, 'mob2033_Kill')
RegisterUnitEvent(2033, 4, 'mob2033_Die')
